Advertise NDJSON operation outputs as arrays#1389
Merged
Merged
Conversation
NDJSON endpoints (application/stream+json, x-ndjson, jsonl) declare the schema of one line, but the invoke path collects the stream and returns an array of parsed lines. Extraction stored the per-line schema unwrapped, so describe previews promised a single object that invocations never returned, pushing agents into runtime shape-probing (seen with Vercel getRuntimeLogs). Wrap the stored output schema in an array (with the truncation and raw-text caveats in its description) on both serve paths, share one NDJSON media-type set between extraction and invocation, and stale-mark affected connections via data migrations (sqlite ledger + cloud drizzle 0010) so existing catalogs rebuild with the corrected schemas.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 6949919 | Commit Preview URL Branch Preview URL |
Jul 10 2026, 05:41 AM |
Contributor
Cloudflare previewTorn down — the PR is closed. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 6949919 | Jul 10 2026, 05:42 AM |
RhysSullivan
marked this pull request as ready for review
July 10, 2026 05:43
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NDJSON endpoints (
application/stream+json,x-ndjson,jsonl) declare the schema of one line, but invocations return an array of parsed lines. The advertised output schema now wraps the line schema in an array, so describe previews match what actually comes back. Existing integrations with NDJSON operations get stale-marked once (sqlite ledger + drizzle 0010) so their catalogs rebuild with the corrected schemas.New cross-target e2e scenario (
openapi-ndjson-output.test.ts) pins the contract end to end: register an NDJSON spec, compare the advertised type fromtools.schema/describe.toolagainst a live invocation. Green on cloud and selfhost.